package route

import (
	"github.com/gin-gonic/gin"
	"router/core"
)

func InitBookRoute(r *gin.Engine) {
	//主路径会跟子路径进行一个拼凑，比如：/books/add
	bookRoute := r.Group("/books")
	bookRoute.GET("/", core.Book)
	bookRoute.POST("/add", core.AddBook)
	bookRoute.GET("/edit", core.EditBook)
	bookRoute.GET("/delete", core.DeleteBook)

}
